﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace Services.BusinessRules
{
   public class BusinessObject
    {
       static List<string> ErrorList = new List<string>();

       public static  string Validate()
       {
          foreach(var item in ErrorList)
          {
              if(!String.IsNullOrEmpty(item))
              {
                  return item;
              }
          }
          return null;
       }

       public void AddValidate(string check)
       {
           ErrorList.Add(check);
        }

       public static void Clear()
       {
           ErrorList.Clear();
        }

    }
}
